-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug Enso language in ChromeDev tools with --inspect option #3432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So glad we can do this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and elegant! Minor comment inline.
engine/runtime/src/main/java/org/enso/interpreter/node/callable/function/BlockNode.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/test/java/org/enso/interpreter/test/DebuggingEnsoTest.java
Show resolved
Hide resolved
Request: put the documentation on debugging into the |
Thank you for polishing the documentation and merging. |
Pull Request Description
Finally this pull request proposes
--inspect
option to allow debugging of.enso
in Chrome Developer Tools:copy the printed URL into chrome browser and you should see:
One can also debug the
.enso
files in NetBeans or VS Code with Apache Language Server extension just pass in special JVM arguments:enso$ JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,address=8000 ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run ./test/Tests/src/Data/Numbers_Spec.enso Listening for transport dt_socket at address: 8000
and then Debug/Attach Debugger. Once connected choose the Toggle Pause in GraalVM Script button in the toolbar (the "G" button):
and your execution shall stop on the next
.enso
line of code. This mode allows to debug both - the Enso code as well as Java code.Originally started as an attempt to write test in Java:
build.sbt
-g
- so it can be debuggedStatementNode
- only gets created whenmaterialize
request gets toBlockNode
Important Notes
Checklist
Please include the following checklist in your PR: